﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apriori
{
    /// <summary>
    /// A data structure for holding all transactions.
    /// </summary>
    class Market
    {
        private static int marketsize;
        public Transaction [] basket;

        public Market(int tsize)
        {
            marketsize = tsize;
            basket = new Transaction[marketsize];
        }

        public void AddTransaction(int index, Transaction b)
        {
            basket[index] = b;
        }

        public string PrintMarket()
        {
            string print = "";
            foreach (Transaction b in basket)
            {
                print += b.ToString() + "\n";
            }
            return print;
        }
    }
}
